package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.Manager;
import org.csu.mypetstore.persistence.ManagerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ManagerService {
    @Autowired
    ManagerMapper managerMapper;

    public boolean isexist(String username,String password){
        if(managerMapper.isexist(username,password)!= null){
            return true;
        }
        else
            return  false;
    }
    public void register(Manager manager){
        managerMapper.insert(manager);
    }
    public Manager getaccountbyusername(String username){
        return managerMapper.getmanagerbyusername(username);
    }
}
